Many businesses are providing access to their products and services through applications that are delivered over computer networks such as the Internet. These applications typically have a multi-tiered architecture. In those cases where the applications are delivered over the Internet they are commonly referred to as Web-based applications. FIG. 1 is a block diagram of a Web-based application 100 having a multi-tiered architecture.
Web-based application 100 includes client layer 110, application layer 120, and database layer 130. Client layer 110 includes user interface 112 that runs on a client computing device such as a desktop computer, laptop computer, personal digital assistant, telephone, and the like. In a Web-based environment, user interface 112 is typically a Web browser. User interface 112 may collect input from a user and provide that input to application layer 120 for processing.
Database layer 130 includes data access logic used by business logic 144 to store and retrieve data in database 132. Database 132 provides non-volatile storage (sometimes referred to as a persistent store) for the data accessed and/or processed by application layer 120. Database 132 may be, for example, a relational database or an object-oriented database.
Application layer 120 includes application server 122 to receive and process input from client layer 110. Application server 122 typically includes a number of subcomponents including, for example, connectivity layer 140, presentation logic 142, business logic 144, and database interface 146. Connectivity layer 140 provides connections to client layer 110 using protocols such as the HyperText Transfer Protocol (HTTP), HTTP secured through the Secure Socket Layer, the Simple Object Access Protocol (SOAP), and the like. Presentation logic 142 generates a Graphical User Interface (GUI) using, for example, a markup language such as the Hyper Text Markup Language (HTML). Business logic 144 represents the core of the application, for example, the rules governing the underlying business process (or other functionality) provided by the application. Database interface layer 146 provides an interface to database layer 130. The Java 2 Enterprise Edition Specification v1.3, published on Jul. 27, 2001 (the J2EE Standard) defines an increasingly popular architecture for application layer 120.
The popularity of the J2EE Standard is based, in part, on the hardware independent nature of the Java platform. Unlike programs written in C or C++, Java programs are not compiled into machine language for a specific hardware platform. Instead, they are compiled into an intermediate language called bytecode. The bytecode includes a binary representation of data types such as classes and interfaces. The term “class” refers to a data type that defines a collection of objects that share the same characteristics.
The executable portions of a class file are machine code for a special kind of computer called a Java Virtual Machine (JVM). The JVM is a software implementation of an execution engine for the class files. The JVM provides classes to programs as needed during runtime. The term “class loading” refers to the process of bringing a binary representation of a class into the JVM.
One or more class loaders control the loading of classes into the JVM. A “class loader” is an implementation of a class that is responsible for finding and loading class files at runtime. Class loaders are organized into parent/child hierarchies in which each “child” class loader maintains a reference to its “parent” class loader. Typically, a class loader is able to delegate the loading of a class to another class loader. For example, when a child class loader is presented with a class loading request, it checks whether its parent class loader can load the class before trying to load the class itself.
Although the multi-tiered architecture provides a more flexible and scalable architecture than traditional two-tier systems, it also results in significant added complexity. Application servers based on the J2EE Standard use a variety of class loaders to, for example, load J2EE components. In addition, a separate class loader may be used to load the classes for each application deployed to the application server. These class loaders may use a relatively complex set of references to delegate the loading of classes to one another.